home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-14
/
chk4hypd.zip
/
CHK4HYPD.ASM
< prev
next >
Wrap
Assembly Source File
|
1991-12-29
|
2KB
|
73 lines
; CHK4HYPD, a quick hack that should check whether or not HyperDisk v4.20+ is
; installed. If it is, ERRORLEVEL 1 is returned, 0 if it's not.
;
; By Michael Shields. Released to the public domain with no warranty at all,
; expressed or implied, etc., etc. Written 12-29-91.
;
; The code's probably not very good, but it works. Feel free to change it.
;
; Based on this entry from Ralf Brown's interrupt list v27:
;
; ----------2FDF--BX4448-----------------------
; INT 2F - Multiplex - HyperDisk v4.20+ - INSTALLATION CHECK
; AH = DFh
; BX = 4448h ('DH')
; Return: AL = FFh if installed
; CX = 5948h ('YH')
; BX:DX -> ??? in resident portion if BX=4448h on entry
; Note: HyperDisk is a shareware disk cache by HyperWare (Roger Cross)
; SeeAlso: INT 13/AX=8EEDh
true equ -1
false equ 0
; CHK4HYPD can be assembled to check AL and/or CX. To modify the checking,
; just change these equates and reassemble. If checking both is too picky for
; your version of HyperDisk, try setting CheckCX false. If it STILL doesn't
; work, you can try CheckAL false and CheckCX true.
CheckAL equ true
CheckCX equ true
; The following directives produce an error if you set *BOTH* to "false".
ife CheckAL
ife CheckCX
.err You need to set at least one equate--CheckAl or CheckCX--to TRUE.
endif
endif
.MODEL SMALL
.STACK 128 ;It's a simple program!
.CODE
Main PROC
mov ah, 0DFh
mov bx, 4448h
int 2Fh
if CheckAL
cmp al, 0FFh
jne NotInstalled
endif
if CheckCX
cmp cx, 5948h
jne NotInstalled
endif
mov al, 1
jmp SHORT Exit
NotInstalled:
xor al, al
Exit: mov ah, 4Ch
int 21h
ENDP Main
END